home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / New System Software Extensions / OpenDoc A6 / OpenDoc Parts Framework / OPF / Examples / Text / Include / TextSelc.h < prev    next >
Encoding:
Text File  |  1994-04-21  |  3.4 KB  |  105 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                            TextSelc.h
  4. //    Release Version:    $ 1.0d1 $
  5. //
  6. //    Author:                        Anthone Burbidge
  7. //    Creation Date:        3/28/94
  8. //
  9. //    Copyright:    © 1993, 1994 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef _TEXTSELC_
  14. #define _TEXTSELC_
  15.  
  16. // ----- Framework Includes -----
  17.  
  18. #ifndef FWSELECT_H
  19. #include "FWSelect.h"
  20. #endif
  21.  
  22. //========================================================================================
  23. // Forward class declarations
  24. //========================================================================================
  25.  
  26. class CTextPart;
  27.  
  28.  
  29. //========================================================================================
  30. // CLASS CTextSelection
  31. //========================================================================================
  32.  
  33. class CTextSelection : public FW_CSelection
  34. {
  35. //------------------------------------------------------------------------------
  36. //    • Initialization/Destruction
  37. //
  38. public:
  39.                         CTextSelection();
  40.     void                InitTextSelection(CTextPart* textPart);
  41.     virtual                ~CTextSelection();
  42.     
  43. //------------------------------------------------------------------------------
  44. //    • Inherited API
  45. //
  46. public:
  47.     virtual void        CloseSelection();
  48.     virtual void        SelectAll();
  49.     virtual FW_Boolean    IsEmpty() const;
  50.  
  51.     // ----- Cut/Copy/Paste/Clear -----
  52.     virtual FW_Boolean    DoClear();
  53.  
  54.     virtual FW_CProxyRun*    IsSelectionOnlyOneProxyRun() const;
  55.  
  56.     virtual FW_Boolean    EmbedSelection(XMPPart* xmpPart, XMPShape* frameShape);
  57.  
  58.     virtual void        ExternalizeSelection_ContentPropertyValueType
  59.                             (XMPStorageUnit* storageUnit, FW_CFrame* commandFrame, XMPCloneKind cloneKind);
  60.     virtual void        ExternalizeSelection_TEXT
  61.                             (XMPStorageUnit* storageUnit, FW_CFrame* commandFrame, XMPCloneKind cloneKind);
  62.     virtual void        ExternalizeSelection
  63.                             (XMPStorageUnit* storageUnit, FW_CFrame* commandFrame, XMPCloneKind cloneKind);
  64.     virtual FW_Boolean    InternalizeSelection_ContentPropertyValueType
  65.                             (XMPStorageUnit* storageUnit, XMPCloneKind cloneKind);
  66.     virtual FW_Boolean    InternalizeSelection_TEXT
  67.                             (XMPStorageUnit* storageUnit, XMPCloneKind cloneKind);
  68.     virtual FW_Boolean    InternalizeSelection
  69.                             (XMPStorageUnit* storageUnit, XMPCloneKind cloneKind);
  70.  
  71.     // ----- Drag & Drop -----
  72.     virtual XMPRgnHandle CalcDragRgn(FW_CFacet* facet);
  73.     virtual FW_Boolean    DoDrop(XMPStorageUnit* dropSU, FW_CFacet* facet, const FW_CPoint& originPoint, const FW_CPoint& dropPoint);
  74.     virtual FW_Boolean    DoDroppedInSameFrame(XMPStorageUnit* dropSU, FW_CFacet* facet, const FW_CPoint& originPoint, const FW_CPoint& dropPoint);
  75.     
  76.     // ----- Parameter accessors -----
  77.     FW_Boolean            IsCloning() const
  78.                             { return fIsCloning; }
  79.     FW_CFrame*                GetCommandFrame() const
  80.                             { return fCommandFrame; }
  81.     XMPCloneKind        GetCloneKind() const
  82.                             { return fCloneKind; }
  83.  
  84. //------------------------------------------------------------------------------
  85. //    • Inherited API
  86. //
  87. public:
  88.     virtual FW_Boolean    IsPointInSelection(const FW_CPoint& xmpPt);
  89.     
  90. //------------------------------------------------------------------------------
  91. //    • Data Members
  92. //
  93. private:
  94.     CTextPart*            fTextPart;
  95.  
  96.     // The following fields are used to pass parameters from a text part through
  97.     // textension to an embedded part.
  98.     
  99.     FW_Boolean            fIsCloning;
  100.     FW_CFrame*                fCommandFrame;
  101.     XMPCloneKind        fCloneKind;
  102. };
  103.  
  104. #endif
  105.